<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html class="no-js fixed-layout">
<head>
    <title>武汉美食城|武汉PHP培训|长乐教育</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>长乐美食城后台管理系统</title>
    <meta name="description" content="武汉PHP|武汉PHP培训|长乐教育|武汉美食">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="/Public/vendor/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/Public/vendor/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="/Public/vendor/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="/Public/vendor/assets/css/admin.css">
    <link rel="stylesheet" href="/Public/assets/admin/css/common.css">
    <link rel="stylesheet" href="/Public/vendor/nprogress/nprogress.css">

    
    <link rel="stylesheet" href="/Public/vendor/daterangepicker/daterangepicker.css">
    <style>
        .am-icon-heart {
            color: red;
        }

        #copy {
            cursor: pointer;
        }
    </style>

</head>
<body>

<header class="am-topbar admin-header">
    <div class="am-topbar-brand">
        <strong>长乐美食城</strong>
        <small>后台管理中心</small>
    </div>

    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
            data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span
            class="am-icon-bars"></span></button>

    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
            <li><a href="javascript:;"><span class="am-icon-envelope-o"></span> 收件箱 <span
                    class="am-badge am-badge-warning">5</span></a></li>
            <li class="am-dropdown" data-am-dropdown>
                <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                    <span class="am-icon-users"></span> 欢迎 <?php echo ($_SESSION['user']['username']); ?> 回来 <span class="am-icon-caret-down"></span>
                </a>
                <ul class="am-dropdown-content">
                    <li><a href="<?php echo U('User/logout');?>"><span class="am-icon-power-off"></span> 退出</a></li>
                </ul>
            </li>
            <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"><span
                    class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>
        </ul>
    </div>
</header>


<div class="am-cf admin-main">
    <!-- sidebar start -->
    <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
    <div class="am-offcanvas-bar admin-offcanvas-bar">
        <ul class="am-list admin-sidebar-list">
            <li><a href="/admin" id="admin"><span class="am-icon-home"></span> 首页</a></li>
            <li class="admin-parent">
                <a class="am-cf" data-am-collapse="{target: '#shop-nav'}"><span
                        class="am-icon-shopping-cart"></span>
                    商城中心 <span class="am-icon-angle-right am-fr am-margin-right"></span></a>
                <ul class="am-list am-collapse admin-sidebar-sub am-in" id="shop-nav">
                    <li><a href="<?php echo U('Product/index');?>" class="am-cf"><span class="am-icon-product-hunt"></span>
                        商品管理<span
                                class="am-badge am-badge-success am-margin-right am-fr"><?php echo ($count['products']); ?></span></a>
                    </li>
                    <li><a href="<?php echo U('Category/index');?>"><span class="am-icon-calendar"></span> 分类管理</a></li>
                    <li><a href="<?php echo U('Advert/index');?>"><span class="am-icon-google"></span> 广告管理<span
                            class="am-badge am-badge-warning am-margin-right am-fr"><?php echo ($count['advert']); ?></span></a></li>
                    <li><a href="<?php echo U('Product/trash');?>"><span class="am-icon-bug"></span> 商品回收站<span
                            class="am-badge am-badge-primary am-margin-right am-fr"><?php echo ($count['trash']); ?></span></a></li>
                    <li><a href="<?php echo U('Customer/index');?>"><span class="am-icon-user"></span> 会员管理<span
                            class="am-badge am-badge-secondary am-margin-right am-fr"><?php echo ($count['customer']); ?></span></a>
                    </li>
                    <li><a href="<?php echo U('Order/index');?>"><span class="am-icon-first-order"></span> 订单管理<span
                            class="am-badge am-badge-success am-margin-right am-fr"><?php echo ($count['orders']); ?></span></a>
                    </li>
                </ul>
            </li>

            <li class="admin-parent">
                <a class="am-cf" data-am-collapse="{target: '#rules-nav'}"><span
                        class="am-icon-gear am-icon-spin"></span> 系统管理 <span
                        class="am-icon-angle-right am-fr am-margin-right"></span></a>
                <ul class="am-list am-collapse admin-sidebar-sub am-in" id="rules-nav">
                    <li><a href="<?php echo U('AuthSet/rule_manage');?>"><span class="am-icon-lock"></span> 菜单与权限<span
                            class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span></a></li>
                    <li><a href="<?php echo U('AuthSet/group_manage');?>"><span class="am-icon-group"></span> 用户组管理<span
                            class="am-badge am-badge-success am-margin-right am-fr"><?php echo ($count['groups']); ?></span></a></li>
                    <li><a href="<?php echo U('AuthSet/user_manage');?>"><span class="am-icon-user"></span> 用户管理<span
                            class="am-badge am-badge-secondary am-margin-right am-fr"><?php echo ($count['users']); ?></span></a>
                    </li>
                </ul>
            </li>
        </ul>

        <div class="am-panel am-panel-default admin-sidebar-panel">
            <div class="am-panel-bd">
                <p><span class="am-icon-bookmark"></span> 思考</p>
                <p>时光静好，与君语；细水流年，与君同。—— Holy</p>
            </div>
        </div>

        <div class="am-panel am-panel-default admin-sidebar-panel">
            <div class="am-panel-bd">
                <p><span class="am-icon-tag"></span> 长乐未央</p>
                <p>黄老师工作室 Create By Holy From 2017-11-01 To 2017-11-31!</p>
            </div>
        </div>
    </div>
</div>
<script src="/Public/vendor/assets/js/jquery.min.js"></script>
<script src="/Public/vendor/assets/js/amazeui.min.js"></script>
<script>
    $(function () {
//        $(".am-list li a").click(function () {
//            $(this).addClass('am-active');
//        })
    })
</script>

    <!-- sidebar end -->

    <!-- content start -->
    
    <div class="admin-content">

        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">订单列表</strong> /
                <small>Order List</small>
            </div>
        </div>

        <hr>
        <div class="am-g">
            <div class="am-u-sm-12 am-u-md-12">
                <form class="am-form-inline" role="form" method="get">

                    <div class="am-form-group">
                        <input type="text" name="order_no" class="am-form-field am-input-sm" placeholder="按订单号"
                               value="<?php echo $name; ?>">
                    </div>

                    <div class="am-form-group">
                        <input type="text" name="tel" class="am-form-field am-input-sm" placeholder="按手机号"
                               value="">
                    </div>

                    <div class="am-form-group">
                        <input type="text" id="created_at" placeholder="选择时间日期" name="created_at"
                               value="" class="am-form-field am-input-sm" style="width: 220px;"/>
                    </div>

                    <div class="am-form-group">
                        <select name="status">
                            <option value="">订单状态</option>

                            <?php if(is_array($orderStatus)): $i = 0; $__LIST__ = $orderStatus;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($i); ?>"><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>

                        </select>
                    </div>

                    <button type="submit" class="am-btn am-btn-success am-btn-xs">查询</button>
                    <a href="<?php echo U('Order/index');?>" class="am-btn am-btn-danger am-btn-xs">重置</a>
                </form>
            </div>
        </div>

        <div class="am-g">
            <div class="am-u-sm-12">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                    <tr>
                        <th>订单号</th>
                        <th class="table-thumb">收货人</th>
                        <th class="table-title">手机号</th>
                        <th class="table-category">总金额</th>
                        <th class="table-brand">订单状态</th>
                        <th class="table-price">付款时间</th>
                        <th class="table-set">操作</th>
                    </tr>
                    </thead>
                    <tbody>

                    <?php if(is_array($orders)): $i = 0; $__LIST__ = $orders;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$order): $mod = ($i % 2 );++$i;?><tr>
                            <td>
                                <?php echo ($order["order_no"]); ?>&nbsp;&nbsp;&nbsp;&nbsp;
                                <a data-clipboard-text="<?php echo ($order["order_no"]); ?>" id="copy"
                                   data-am-popover="{theme: 'secondary sm', content: '复制单号', trigger: 'hover focus'}">
                                    <span class="am-badge am-badge-success am-radius">
                                        <span class="am-icon-copy"></span>
                                    </span>
                                </a>
                            </td>
                            <td><?php echo ($order["name"]); ?></td>
                            <td><?php echo ($order["tel"]); ?></td>
                            <td><span class="am-icon-rmb"><?php echo ($order["total_price"]); ?>元</span></td>
                            <td>
                                <?php if($order['status'] == 0){ ?>
                                <a class="am-btn am-btn-warning am-round am-btn-xs am-text-danger" href="">待付款</a>
                                <?php }elseif($order['status'] == 1){ ?>
                                <a class="am-btn am-btn-danger am-round am-btn-xs am-text-danger" href="">待发货</a>
                                <?php }elseif($order['status'] == 2){ ?>
                                <a class="am-btn am-btn-primary am-round am-btn-xs am-text-danger" href="">已发货</a>
                                <?php }else{ ?>
                                <a class="am-btn am-btn-success am-round am-btn-xs am-text-danger" href="">已完成</a>
                                <?php } ?>
                            </td>
                            <td class="am-hide-sm-only"><?php echo (date("Y-m-d H:i:s", $order["created_at"])); ?></td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <a class="am-btn am-btn-primary am-btn-xs"
                                           href="<?php echo U('show', ['id'=>$order[id]]);?>">
                                            <span class="am-icon-eye"></span> 查看订单
                                        </a>
                                    </div>
                                </div>
                            </td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                    </tbody>
                </table>

                共 <?php echo ($count['orders']); ?> 条记录

                <div class="am-fr">
                    <ul class="am-pagination">
                        <li class="am-disabled"><a href="javascript:;">«</a></li>
                        <?php echo ($show_page); ?>
                        <li><a href="javascript:;">»</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <footer class="admin-content-footer">
            <hr>
            <p> &nbsp;&nbsp;Copyright © 2017. Made With <i class="am-icon am-icon-heart"></i> By Holy. All
                Rights Reserved.
            </p>
        </footer>
    </div>

    <!-- content end -->

</div>

<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu"
   data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

<script src="/Public/vendor/assets/js/jquery.min.js"></script>
<script src="/Public/vendor/assets/js/amazeui.min.js"></script>
<script src="/Public/vendor/assets/js/app.js"></script>
<script src="/Public/vendor/nprogress/nprogress.js"></script>
<script src="/Public/assets/admin/js/common.js"></script>

    <script src="/Public/vendor/daterangepicker/moment.js"></script>
    <script src="/Public/vendor/moment/locale/zh-cn.js"></script>
    <script src="/Public/vendor/daterangepicker/daterangepicker.js"></script>
    <script src="/Public/vendor/clipboard/dist/clipboard.min.js"></script>
    <script src="/Public/assets/admin/js/daterange_config.js"></script>
    <script>
        $(function () {
            var clipboard = new Clipboard('#copy');
            clipboard.on('success', function () {
                alert('单号已复制');
                return false;
            });
        })
    </script>

</body>
</html>